package com.SparkCore.RDD.IO

import org.apache.spark.{SparkConf, SparkContext}

object Spark02_RDD_IO_Load {
  def main(args: Array[String]): Unit = {
    val sparkConf = new SparkConf().setMaster("local").setAppName("load")
    val sc = new SparkContext(sparkConf)

    val rdd = sc.textFile("output1")
    println(rdd.collect().mkString(","))

    val rdd2 = sc.objectFile[(String,Int)]("output2")
    println(rdd2.collect().mkString(","))

    val rdd3 = sc.sequenceFile[String,Int]("output3")
    println(rdd3.collect().mkString(","))


    sc.stop()
  }

}
